package top.shen33.yang.controller;


import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.shen33.yang.base.R;
import top.shen33.yang.base.util.Base64Util;

/**
 *
 *
 */
@RestController
@RequestMapping("/sysTool")
public class SysToolController {

    @RequestMapping("/b64encode/{text}")
    public Object b64encode(@PathVariable String text){

        String encode = Base64Util.encode(text);

        return R.ok("encode", encode);


    }

    @RequestMapping("/b64decode/{text}")
    public Object b64decode(@PathVariable String text){

        String decode = Base64Util.decode(text);

        return R.ok("decode", decode);


    }

}
